<link rel="stylesheet" href="css/ui/examine.css"/>
<!-- <script type="text/javascript" src="js/ui/examine.js"></script> -->
<link rel="stylesheet" href="css/easydialog.css"/>
<script type="text/javascript" src="js/easydialog.min.js"></script>
<script type="text/javascript" src="js/ui/jquery.fullscreenslides.js"></script>

<div class="examine_div">
<?if($m_info['certi_status']=='0'):?>
<?elseif($m_info['certi_status']=='1'):?>
    <span class="exm"></span>
<?elseif($m_info['certi_status']=='2'):?>
    <span class="exme"></span>
<?else:?>
    <span class="exmc"></span>
<?endif;?>

<div class="examine_first">
		<span class="e_name">
			<span class="e_name_e">账号：<?=$m_info['account']?></span>
			<span class="e_name_e">系统通知：<?=$accept_txt[$m_info['n_accept']]?></span>
		</span>
		<span class="e_name">
			<span class="e_name_e">账户名：<?=$m_info['dname']?></span>
			<span class="e_name_e">短信通知：<?=($m_info['smsautosmstype']==0)? '通知':'不通知';?></span>
		</span>
		<span class="e_name">
			<span class="e_name_e">资金余额：<?=$m_info['money']/100?></span>
			<span class="e_name_e">短信发送：<?=($m_info['smstype']==0)? '平台发送':'自发短信';?></span>
		</span>
</div>
<div class="examine_secend">
		<span class="e_name">
			<span class="e_name_e">联系人：<?=$m_info['cname']?></span>
			<span class="e_name_e">性别：<?=($m_info['sex']=='M')? '男':'女';?></span>
			<span class="e_name_e">手机号码：<?=$m_info['mobile']?></span>
			<span class="e_name_e">联系电话：<?=$m_info['ctel']?></span>
			<span class="e_name_e">联系QQ：<?=$m_info['qq']?></span>
			<span class="e_name_e">联系邮箱：<?=$m_info['email']?></span>
			<span class="e_name_e">传真号码：<?=$m_info['fax']?></span>
		</span>
		<span class="e_name">
			<span class="e_name_e">公司名称：<?=$m_info['com_name']?></span>
			<span class="e_name_e">公司简称：<?=$m_info['short_company_name']?></span>
			<span class="e_name_e">公司类型：<?=$m_info['com_type']?></span>
			<span class="e_name_e">经营范围：<?=$m_info['business']?></span>
			<span class="e_name_e">公司网址：<?=$m_info['website']?></span>
			<span class="e_name_e">所在城市：<?=$m_info['province'].$m_info['city']?></span>
			<span class="e_name_e">所在地址：<?=$m_info['address']?></span>
		</span>
</div>
<div class="examine_third" id="examine_third">
    <?if($m_info['com_type']=='个人'):?>
        <span class="e_name">
			<a rel="gallery" title="手持身份证（正面）" href="images/defaultThum.jpg">
                <img src="images/defaultThum.jpg">
            </a>
			<p>手持身份证（正面）</p>
		</span>
        <span class="e_name">
			<a rel="gallery" title="手持身份证（背面）" href="images/defaultThum.jpg">
                <img src="images/defaultThum.jpg">
            </a>
			<p>手持身份证（背面）</p>
		</span>
        <span class="e_name">
			<a rel="gallery" title="其他证件" href="images/defaultThum.jpg">
                <img src="images/defaultThum.jpg">
            </a>
			<p>其他证件</p>
		</span>
    <?else:?>
        <span class="e_name">
			<a rel="gallery" title="营业执照" href="<?=$m_info['bsn_les'];?>">
                <img src="<?=$m_info['bsn_les'];?>">
            </a>
			<p>营业执照</p>
		</span>
        <span class="e_name">
			<a rel="gallery" title="经营许可证" href="<?=$m_info['opt_les'];?>">
                <img src="<?=$m_info['opt_les'];?>">
            </a>
			<p>经营许可证</p>
		</span>
        <span class="e_name">
			<a rel="gallery" title="资源方授权书" href="<?=$m_info['auth_les'];?>">
                <img src="<?=$m_info['auth_les'];?>">
            </a>
			<p>资源方授权书</p>
		</span>
        <span class="e_name">
			<a rel="gallery" title="组织机构代码证" href="<?=$m_info['org_les'];?>">
                <img src="<?=$m_info['org_les'];?>">
            </a>
			<p>组织机构代码证</p>
		</span>
        <span class="e_name">
			<a rel="gallery" title="税务登记证" href="<?=$m_info['tax_les'];?>">
                <img src="<?=$m_info['tax_les'];?>">
            </a>
			<p>税务登记证</p>
		</span>
    <?endif;?>
    <div id="pop-window">
        <div id="pop-img">
            <a href="#"><img src="" /></a>
        </div>
    </div>
</div>

<?if($m_info['certi_status']=='1' && $_SESSION['sid'] == 1):?>
    <div class="examine_btn">
        <a id="sureBtn" class="sure" href="#" data-did="<?=$m_info['id']?>">通过审核</a>
        <a id="removeBtn" class="remove" href="#" data-did="<?=$m_info['id']?>">驳回</a>
    </div>
<?elseif($m_info['certi_status']=='2' && $_SESSION['sid'] == 1):?>
    <div class="examine_btn">
        <a id="sureBtn_a" class="sure" href="#" data-did="<?=$m_info['id']?>">撤销审核</a>
    </div>
<?elseif($m_info['certi_status']=='3'):?>
    <div class="examine_title">失败原因:<?=$m_info['ref_reason']?></div>
<?endif;?>

<script>


    $(".examine_btn").on("click","#sureBtn",function(){
        var data = "action";
        var did = $(this).attr("data-did");
        if(confirm("您确定通过审核？")){
            $.post("call/jh_mem.php",{did:did,status:2,action:"accredits_auth"},function(data){
                if(data.status=='success'){
                    alert(data.msg);
                    window.location.reload();
                }else{
                    alert(data.msg);
                }
            },'json');
        }
    });
    $(".examine_btn").on("click","#sureBtn_a",function(){
        var data = "action";
        var did = $(this).attr("data-did");
        if(confirm("您确定撤销审核？")){
            $.post("call/jh_mem.php",{did:did,status:0,action:"accredits_auth"},function(data){
                if(data.status=='success'){
                    alert(data.msg);
                    window.location.reload();
                }else{
                    alert(data.msg);
                }
            },'json');
        }
    });
    $(".examine_btn").on("click","#removeBtn",function(){
        var did = $(this).attr("data-did");
        content = '<form id="account_setting" action="ddddd">';
        content+= '<input type="hidden" name="did" value="'+did+'">';
        content+= '<input type="hidden" name="status" value="3">';
        content+= '<input type="hidden" name="action" value="accredits_auth">';
        content+= '<textarea rows="3" class="text_area"  name="msg" value="" cols="20"></textarea>';
        content+= '</form>';
        easyDialog.open({
            container : {
                header : '驳回原因',
                content : content,
                yesFn : function(){
                    var data = $("#account_setting").serialize();
                    $.post("call/jh_mem.php",data,function(data){
                        if(data.status=='success'){
                            alert(data.msg);
                            window.location.reload();
                        }
                        else{
                            alert(data.msg);
                            window.location.reload();
                        }

                    },'json');

                },
                noFn : true
            }

        });
    });
    $(function(){

        $('.e_name img').fullscreenslides();

        var $container = $('#fullscreenSlideshowContainer');

        $container

            .bind("init", function() {

                $container
                    .append('<div class="ui" id="fs-close">&times;</div>')
                    .append('<div class="ui" id="fs-loader">Loading...</div>')
                    .append('<div class="ui" id="fs-prev">&lt;</div>')
                    .append('<div class="ui" id="fs-next">&gt;</div>')
                    .append('<div class="ui" id="fs-caption"><span></span></div>');

                $('#fs-prev').click(function(){
                    $container.trigger("prevSlide");
                });

                $('#fs-next').click(function(){
                    $container.trigger("nextSlide");
                });

                $('#fs-close').click(function(){
                    $container.trigger("close");
                });

            })

            .bind("startLoading", function() {
                $('#fs-loader').show();
            })

            .bind("stopLoading", function() {
                $('#fs-loader').hide();
            })

            .bind("startOfSlide", function(event, slide) {

                $('#fs-caption span').text(slide.title);
                $('#fs-caption').show();
            })

            .bind("endOfSlide", function(event, slide) {
                $('#fs-caption').hide();
            });

    });
</script>
</div>